<template>
  <div class="container">
    <!-- <div v-if="permission_routes.length>4">
      <div class="dashboard-text">name: {{ name }}</div>
      <div class="dashboard-text">
        roles:
        <span v-for="role in roles" :key="role">{{ role }}</span>
      </div>
    </div> -->

    <div class="wapper" v-if="permission_routes.length <= 4">
      <div class="img">
        <img src="../../assets/images/nopermission.png" alt="" />
      </div>
      <span class="hint">该权限暂无功能开放</span>
    </div>
    <div class="wapper" v-else>
      <div class="welcome-img">
        <img src="../../assets/images/welcome.png" alt="" />
      </div>
      <!-- <span class="welcome-title">welcome</span> -->
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters(['permission_routes', 'name'])
  },
  mounted() {}
}
</script>

<style lang="scss" scoped>
.container {
  background: #ffffff;
  box-shadow: 0px 1px 5px 2px rgba(230, 230, 230, 0.5);
  min-height: 783px;
  padding: 14px 15px;
  .wapper {
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .img {
      width: 200px;
      height: 200px;
      img {
        height: 100%;
        width: 100%;
      }
    }
    .welcome-img {
      width: 320px;
      img {
        width: 100%;
      }
    }
    .welcome-title {
      margin: 50px 0 8px 0;
      color: #0d5dfe;
      font-size: 60px;
      font-weight: 500;
    }
    .hint {
      font-size: 16px;
      font-weight: 400;
      color: #646566;
      line-height: 22px;
    }
  }
}
.dashboard {
  // &-container {
  //   margin: 30px;
  // }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
